﻿using AutoMapper;
using KWT.DRG_DIP.DTO.Basic.Menu;
using KWT.DRG_DIP.PO.Basic;

namespace KWT.DRG_DIP.Mapper.Basic
{
    public class MenuMapper : Profile
    {
        public MenuMapper()
        {
            CreateMap<Sys_Menu, InAddOrUpdate>()
                 .ForMember(d => d.id, opt => opt.MapFrom(src => src.MenuID))
                .ForMember(d => d.title, opt => opt.MapFrom(src => src.Title))
                 .ForMember(d => d.pid, opt => opt.MapFrom(src => src.PID))
                  .ForMember(d => d.name, opt => opt.MapFrom(src => src.Name))
                  .ForMember(d => d.component, opt => opt.MapFrom(src => src.Component))
                .ReverseMap();
        }
    }
}
